package com.ruoyi.cscec.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cscec.mapper.DataTotalMapper;
import com.ruoyi.cscec.domain.DataTotal;
import com.ruoyi.cscec.service.IDataTotalService;

/**
 * 数据汇总表Service业务层处理
 *
 * @author ruoyi
 * @date 2021-09-27
 */
@Service
public class DataTotalServiceImpl implements IDataTotalService
{
    @Autowired
    private DataTotalMapper dataTotalMapper;

    /**
     * 查询数据汇总表
     *
     * @param id 数据汇总表主键
     * @return 数据汇总表
     */
    @Override
    public DataTotal selectDataTotalById(Long id)
    {
        return dataTotalMapper.selectDataTotalById(id);
    }

    /**
     * 查询数据汇总表列表
     *
     * @param dataTotal 数据汇总表
     * @return 数据汇总表
     */
    @Override
    public List<DataTotal> selectDataTotalList(DataTotal dataTotal)
    {
        return dataTotalMapper.selectDataTotalList(dataTotal);
    }

    /**
     * 新增数据汇总表
     *
     * @param dataTotal 数据汇总表
     * @return 结果
     */
    @Override
    public int insertDataTotal(DataTotal dataTotal)
    {
        dataTotal.setCreateTime(DateUtils.getNowDate());
        return dataTotalMapper.insertDataTotal(dataTotal);
    }

    /**
     * 修改数据汇总表
     *
     * @param dataTotal 数据汇总表
     * @return 结果
     */
    @Override
    public int updateDataTotal(DataTotal dataTotal)
    {
        return dataTotalMapper.updateDataTotal(dataTotal);
    }

    /**
     * 批量删除数据汇总表
     *
     * @param ids 需要删除的数据汇总表主键
     * @return 结果
     */
    @Override
    public int deleteDataTotalByIds(Long[] ids)
    {
        return dataTotalMapper.deleteDataTotalByIds(ids);
    }

    /**
     * 删除数据汇总表信息
     *
     * @param id 数据汇总表主键
     * @return 结果
     */
    @Override
    public int deleteDataTotalById(Long id)
    {
        return dataTotalMapper.deleteDataTotalById(id);
    }
}
